HTMLify

style.css
Views: 35 | Author: cody
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #151515;
}

.btn {
    display: inline-block;
    position: absolute;
    padding: 15px 40px;
    background-color: #fff;
    color: #151515;
    font-family: sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 100px;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn::after {
    content: "";
    display: inline-block;
    height: 100%;
    width: 100%;
    border-radius: 100px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    transition: all 0.4s;
    background-color: #fff;
}

.btn:hover::after {
    transform: scaleX(1.4) scaleY(1.6);
    opacity: 0;
}

Comments